<div id="preject">
    {switch $Request.session.info.type}
    {case 1}

    {foreach $userinfo as $v}
    <div class="item">学号：<input type="number" name="stuid"  value="{$v.stuid}" required onchange="getstuid(this)"></div>
    <div class="item">姓名：<input type="text" name="name" value="{$v.name}"  required onchange="getname(this)"></div>
    <div class="item">邮箱：<input type="email" name="email" value="{$v.email}"  required></div>
    <div class="item">号码：<input type="number" name="phone" value="{$v.phone}"  required onchange="getphone(this)"></div>
    <div class="item">系部：<input type="text" name="apartment" value="{$v.apartment}"  required ></div>
    <div class="item">年级：<input type="text" name="grade" value="{$v.grade}"  required ></div>
    <div class="item">班级：<input type="text" name="class" value="{$v.class}"  required></div>
    <div class="item"><button onclick="myinfo()">修　改</button></div>

            {/foreach}
    {/case}

    {case 2}
            {foreach $userinfo as $v}
            <tr><th>姓名：</th><td><input type="text" name="name" value="{$v.name}" required onchange="getname(this)"></td></tr>
            <tr><th>邮箱：</th><td><input type="email" name="email"value="{$v.email}" required></td></tr>
            <tr><th>手机号码：</th><td><input type="number" name="phone" value="{$v.phone}" required onchange="getphone(this)"></td></tr>
            <tr><th>部门：</th><td><input type="text" name="apartment" value="{$v.apartment}" required ></td></tr>
            <tr><td></td><td><input  type="submit" value="修　改" onclick="myinfo()"></td></tr>
            {/foreach}
    {/case}

    {case 3}
            {foreach $userinfo as $v}
            <tr><th>姓名：</th><td><input type="text" name="name" value="{$v.name}" required onchange="getname(this)"></td></tr>
            <tr><th>邮箱：</th><td><input type="email" name="email"value="{$v.email}" required></td></tr>
            <tr><th>手机号码：</th><td><input type="number" name="phone" value="{$v.phone}" required onchange="getphone(this)"></td></tr>
            <tr><th>部门：</th><td><input type="text" name="apartment" value="{$v.apartment}" required ></td></tr>
            <tr><td></td><td><input  type="submit" value="修　改" onclick="myinfo()"></td></tr>
            {/foreach}
    {/case}
    {/switch}

</div>